<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置面板 - 原型图</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            margin: 0;
            padding: 40px;
            min-height: 100vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }

        h1 {
            color: #333;
            text-align: center;
            margin-bottom: 40px;
            font-size: 2.5em;
            font-weight: 300;
        }

        .settings-container {
            display: grid;
            grid-template-columns: 250px 1fr;
            gap: 30px;
            background: #f8f9fa;
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 40px;
        }

        .sidebar {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .sidebar-title {
            font-size: 1.2em;
            color: #333;
            margin-bottom: 20px;
            font-weight: 600;
            padding-bottom: 10px;
            border-bottom: 2px solid #e9ecef;
        }

        .nav-item {
            padding: 12px 15px;
            margin-bottom: 8px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #555;
        }

        .nav-item:hover {
            background: #f0f8ff;
            color: #2196F3;
        }

        .nav-item.active {
            background: #2196F3;
            color: white;
        }

        .content-area {
            background: white;
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .section-title {
            font-size: 1.5em;
            color: #333;
            margin-bottom: 25px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .setting-group {
            margin-bottom: 30px;
        }

        .setting-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .setting-item:last-child {
            border-bottom: none;
        }

        .setting-label {
            flex: 1;
        }

        .setting-name {
            font-weight: 600;
            color: #333;
            margin-bottom: 5px;
        }

        .setting-description {
            font-size: 0.9em;
            color: #666;
            line-height: 1.4;
        }

        .setting-control {
            min-width: 120px;
        }

        .toggle-switch {
            position: relative;
            width: 50px;
            height: 24px;
            background: #ccc;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .toggle-switch.active {
            background: #4CAF50;
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: transform 0.3s ease;
        }

        .toggle-switch.active::after {
            transform: translateX(26px);
        }

        .input-field {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.9em;
            transition: border-color 0.3s ease;
        }

        .input-field:focus {
            outline: none;
            border-color: #2196F3;
            box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
        }

        .select-field {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.9em;
            background: white;
            cursor: pointer;
        }

        .number-field {
            width: 80px;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.9em;
            text-align: center;
        }

        .button {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .button.primary {
            background: #2196F3;
            color: white;
        }

        .button.primary:hover {
            background: #1976D2;
        }

        .button.secondary {
            background: #f5f5f5;
            color: #333;
            border: 1px solid #ddd;
        }

        .button.secondary:hover {
            background: #e0e0e0;
        }

        .folder-selector {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .folder-path {
            flex: 1;
            padding: 8px 12px;
            background: #f8f9fa;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.9em;
            color: #666;
        }

        .format-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }

        .format-tag {
            padding: 4px 8px;
            background: #e3f2fd;
            color: #1976d2;
            border-radius: 4px;
            font-size: 0.8em;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .format-tag:hover {
            background: #bbdefb;
        }

        .format-tag.selected {
            background: #2196F3;
            color: white;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-top: 40px;
        }

        .feature-card {
            background: #f8f9fa;
            border-radius: 15px;
            padding: 25px;
            border: 2px solid #e9ecef;
        }

        .feature-title {
            font-size: 1.3em;
            color: #333;
            margin-bottom: 15px;
            font-weight: 600;
        }

        .feature-list {
            list-style: none;
            padding: 0;
        }

        .feature-list li {
            padding: 8px 0;
            color: #555;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .feature-list li::before {
            content: "✓";
            color: #4CAF50;
            font-weight: bold;
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #e9ecef;
        }

        .demo-tabs {
            display: flex;
            gap: 20px;
            margin-bottom: 30px;
        }

        .demo-tab {
            padding: 10px 20px;
            background: #f5f5f5;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .demo-tab.active {
            background: #2196F3;
            color: white;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }
    </style>
</head>

<body>
    <div class="container">
        <h1>设置面板 - 原型图</h1>

        <div class="demo-tabs">
            <button class="demo-tab active" onclick="showTab('general')">常规设置</button>
            <button class="demo-tab" onclick="showTab('download')">下载设置</button>
            <button class="demo-tab" onclick="showTab('advanced')">高级设置</button>
        </div>

        <div class="tab-content active" id="general">
            <div class="settings-container">
                <div class="sidebar">
                    <div class="sidebar-title">设置分类</div>
                    <div class="nav-item active">
                        ⚙️ 常规设置
                    </div>
                    <div class="nav-item">
                        📥 下载设置
                    </div>
                    <div class="nav-item">
                        🔧 高级设置
                    </div>
                    <div class="nav-item">
                        📊 统计信息
                    </div>
                    <div class="nav-item">
                        ℹ️ 关于插件
                    </div>
                </div>

                <div class="content-area">
                    <div class="section-title">⚙️ 常规设置</div>

                    <div class="setting-group">
                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">自动扫描页面</div>
                                <div class="setting-description">页面加载完成后自动扫描媒体文件</div>
                            </div>
                            <div class="setting-control">
                                <div class="toggle-switch active"></div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">显示下载通知</div>
                                <div class="setting-description">下载完成后显示桌面通知</div>
                            </div>
                            <div class="setting-control">
                                <div class="toggle-switch active"></div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">插件图标状态</div>
                                <div class="setting-description">在工具栏图标上显示下载状态</div>
                            </div>
                            <div class="setting-control">
                                <div class="toggle-switch active"></div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">语言设置</div>
                                <div class="setting-description">选择插件界面语言</div>
                            </div>
                            <div class="setting-control">
                                <select class="select-field">
                                    <option>简体中文</option>
                                    <option>English</option>
                                    <option>日本語</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="tab-content" id="download">
            <div class="settings-container">
                <div class="sidebar">
                    <div class="sidebar-title">设置分类</div>
                    <div class="nav-item">
                        ⚙️ 常规设置
                    </div>
                    <div class="nav-item active">
                        📥 下载设置
                    </div>
                    <div class="nav-item">
                        🔧 高级设置
                    </div>
                    <div class="nav-item">
                        📊 统计信息
                    </div>
                    <div class="nav-item">
                        ℹ️ 关于插件
                    </div>
                </div>

                <div class="content-area">
                    <div class="section-title">📥 下载设置</div>

                    <div class="setting-group">
                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">默认下载路径</div>
                                <div class="setting-description">设置文件下载的默认保存位置</div>
                            </div>
                            <div class="setting-control">
                                <div class="folder-selector">
                                    <div class="folder-path">C:\Users\用户名\Downloads\媒体文件</div>
                                    <button class="button secondary">浏览</button>
                                </div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">文件命名规则</div>
                                <div class="setting-description">自定义下载文件的命名格式</div>
                            </div>
                            <div class="setting-control">
                                <input type="text" class="input-field" value="{filename}_{timestamp}"
                                    placeholder="命名格式">
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">并发下载数</div>
                                <div class="setting-description">同时下载的最大文件数量</div>
                            </div>
                            <div class="setting-control">
                                <input type="number" class="number-field" value="3" min="1" max="10">
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">文件大小限制</div>
                                <div class="setting-description">单个文件的最大下载大小 (MB)</div>
                            </div>
                            <div class="setting-control">
                                <input type="number" class="number-field" value="100" min="1" max="1000">
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">支持的图片格式</div>
                                <div class="setting-description">选择要下载的图片文件格式</div>
                            </div>
                            <div class="setting-control">
                                <div class="format-tags">
                                    <span class="format-tag selected">JPG</span>
                                    <span class="format-tag selected">PNG</span>
                                    <span class="format-tag selected">GIF</span>
                                    <span class="format-tag">WebP</span>
                                    <span class="format-tag">SVG</span>
                                </div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">支持的视频格式</div>
                                <div class="setting-description">选择要下载的视频文件格式</div>
                            </div>
                            <div class="setting-control">
                                <div class="format-tags">
                                    <span class="format-tag selected">MP4</span>
                                    <span class="format-tag selected">WebM</span>
                                    <span class="format-tag">AVI</span>
                                    <span class="format-tag">MOV</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="tab-content" id="advanced">
            <div class="settings-container">
                <div class="sidebar">
                    <div class="sidebar-title">设置分类</div>
                    <div class="nav-item">
                        ⚙️ 常规设置
                    </div>
                    <div class="nav-item">
                        📥 下载设置
                    </div>
                    <div class="nav-item active">
                        🔧 高级设置
                    </div>
                    <div class="nav-item">
                        📊 统计信息
                    </div>
                    <div class="nav-item">
                        ℹ️ 关于插件
                    </div>
                </div>

                <div class="content-area">
                    <div class="section-title">🔧 高级设置</div>

                    <div class="setting-group">
                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">启用调试模式</div>
                                <div class="setting-description">显示详细的调试信息和控制台日志</div>
                            </div>
                            <div class="setting-control">
                                <div class="toggle-switch"></div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">自动重试下载</div>
                                <div class="setting-description">下载失败时自动重试</div>
                            </div>
                            <div class="setting-control">
                                <div class="toggle-switch active"></div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">重试次数</div>
                                <div class="setting-description">下载失败时的最大重试次数</div>
                            </div>
                            <div class="setting-control">
                                <input type="number" class="number-field" value="3" min="1" max="10">
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">保存下载历史</div>
                                <div class="setting-description">记录下载历史以便查看和管理</div>
                            </div>
                            <div class="setting-control">
                                <div class="toggle-switch active"></div>
                            </div>
                        </div>

                        <div class="setting-item">
                            <div class="setting-label">
                                <div class="setting-name">清除所有数据</div>
                                <div class="setting-description">清除插件的所有设置和下载历史</div>
                            </div>
                            <div class="setting-control">
                                <button class="button secondary">清除</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="action-buttons">
            <button class="button secondary">重置为默认</button>
            <button class="button primary">保存设置</button>
        </div>

        <div class="features-grid">
            <div class="feature-card">
                <div class="feature-title">设置功能</div>
                <ul class="feature-list">
                    <li>分类设置管理 (常规、下载、高级)</li>
                    <li>开关控件和输入字段</li>
                    <li>文件格式选择器</li>
                    <li>文件夹路径选择</li>
                    <li>数值范围限制</li>
                    <li>设置导入导出</li>
                </ul>
            </div>

            <div class="feature-card">
                <div class="feature-title">用户体验</div>
                <ul class="feature-list">
                    <li>直观的侧边栏导航</li>
                    <li>实时设置预览</li>
                    <li>设置验证和错误提示</li>
                    <li>设置搜索功能</li>
                    <li>设置重置功能</li>
                    <li>多语言界面支持</li>
                </ul>
            </div>

            <div class="feature-card">
                <div class="feature-title">技术特性</div>
                <ul class="feature-list">
                    <li>Chrome Storage API 数据持久化</li>
                    <li>设置同步功能</li>
                    <li>权限动态管理</li>
                    <li>设置变更监听</li>
                    <li>数据备份恢复</li>
                    <li>设置版本兼容性</li>
                </ul>
            </div>
        </div>
    </div>

    <script>
        function showTab(tabName) {
            // 隐藏所有标签内容
            const tabContents = document.querySelectorAll('.tab-content');
            tabContents.forEach(content => content.classList.remove('active'));

            // 移除所有标签的激活状态
            const tabs = document.querySelectorAll('.demo-tab');
            tabs.forEach(tab => tab.classList.remove('active'));

            // 显示选中的标签内容
            document.getElementById(tabName).classList.add('active');

            // 激活对应的标签按钮
            event.target.classList.add('active');
        }

        // 切换开关功能
        document.querySelectorAll('.toggle-switch').forEach(toggle => {
            toggle.addEventListener('click', function () {
                this.classList.toggle('active');
            });
        });

        // 格式标签选择功能
        document.querySelectorAll('.format-tag').forEach(tag => {
            tag.addEventListener('click', function () {
                this.classList.toggle('selected');
            });
        });
    </script>
</body>

</html>